<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>js的switch语法</title>
		<script>
			var a
			switch(a){
				case 1:
					alert("number");
					break;
				case "abc":
					alert("string");
					break;
				case true:
					alert("boolean");
					break;
				case null:
					alert("unll");
					break;
				default:
					alert("undefined");
			}
		</script>
	</head>
	<body>
	</body>
</html>
